<?php
/**
 * /nmox/main/mastercode.php
 * MasterCode - Universal Objects
 * 
 * Place any objects that you want universally available in here.
 * If its a big object, consider making it an annex instead.
 *
 * Hmm... should these require_once()'s be in Switchboard instead?
 * 
 * @author David Christian Liedle <david.liedle@gmail.com>
 * @link   http://nmox.org/
 *
 */
################################################################################
# Get static functions:
# (static.php must come first!)
#

require_once($NMOX_ROOT_PATH."/main/static.php");  // gets static functions
require_once($NMOX_ROOT_PATH."/main/xstatic.php"); // gets xstatic functions


################################################################################
# Get constants:
#

require_once($NMOX_ROOT_PATH."/main/constantine.php"); // gets all constants


################################################################################
# Default objects:
#

class MasterCode {

	// example of a class in mastercode
	// use this as a sort of universal
	// module to add features to ALL of NMOX
	// that don't make sense in a module of their own
	
	public function __construct(){
	
		oneShot("MasterCode Test Class Instantiated!");
	
	}

}

class SystemAnalysis {

	// gather information about the system NMOX is on
	
	public static function getPath(){
		return "This system&#8217;s path is: ".$_ENV["PATH"];
	}

}
class DevNotify {

	// use this if you're wanting notifications by email or whatever

}
################################################################################
# Future / experimental notes:
#
    /*
    $timeZoneOffset = -5; // timezone where the user is (use an additional script to determine this variable)
    
      $H = ( date('H') + date('O') ) + $timeZoneOffset; // hour
      $i = date('i'); // minutes
      $s = date('s'); // seconds
      $m = date('m'); // month
      $d = date('d'); // day
      $Y = date('Y'); // year
      $date = date( 'l dS \of F Y h:i:s A O', mktime($H,$i,$s,$m,$d,$Y) ); // formatted
    */
   
   
   /*
    foreach( $GLOBALS as $key=>$value ){
    
    	$message .= "    ".$key.":  ".$value." \n";
    
    }
    */
################################################################################
# Test:
#
locateMe("/nmox/main/mastercode.php");
